
import unittest
from ddt import ddt,data

mydata=[("name","jay1"),("name","jay2"),("name","jay3"),("name","jay3")]
mydata1=[["name","jay"],["name","jay3"],["name","jay"],["name","jay"]]
test1="jay"
# print(list[0][0])
@ddt
class MyTest(unittest.TestCase):
    def setUp(self):
        pass

    def tearDown(self):
        pass

    @data(*mydata1)
    def test01(self,data):
        self.assertEquals(data[0],'name')
        self.assertEquals(data[1],'jay3')
        print( '>>>用例5执行了>>>' )


# 方法二 用例放入列表中，在添加到suite
# suite=unittest.TestSuite()
# list1=[MyTest("test_01")]
# suite.addTests(list1)
# unittest.TextTestRunner().run(suite)


